<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"  
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Usuários</title>
</h:head>
<h:body>
	<ui:composition template="../Layout/principal.xhtml">
		<ui:define name="content">
			<h:form prependId="false">

				<p:dataTable id="tabela" var="user"
					value="#{usuarioController.lista}" paginator="true"
					rows="2"
					paginatorTemplate=" {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					rowsPerPageTemplate="5,10,15" >

					<p:column filterBy="#{user.no_usuario}" headerText="Nome"
						footerText="contains" filterMatchMode="contains">
						<f:facet name="header">
							<h:outputText value="Nome" />

						</f:facet>
						<h:outputText value="#{user.no_usuario}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="Senha" />
						</f:facet>
						<h:outputText value="#{user.no_senha}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="Email" />
						</f:facet>
						<h:outputText value="#{user.no_email}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="Alterar" />
						</f:facet>
						<p:commandButton
							actionListener="#{usuarioController.preparaAtualizar}"
							value="Alterar" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="Excluir" />
						</f:facet>
						<h:commandLink actionListener="#{usuarioController.exclui}"
							value="Excluir" />
					</p:column>
				</p:dataTable>
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>